<template>
    <main class="poster">
    <!-- 添加过渡动画-->
    <transition name="fade" mode="out-in" appear>
      <!-- 切换组件不会更改状态-->
      <KeepAlive>
        <!-- 动态组件切换，登录和注册 -->
        <component class="login-component" :is="status" ref="status" Key="status" @status="changeRegister"></component>
      </KeepAlive>
    </transition>
    <h4 class="display: none;">--- 2022@大数据工作室系统 ---
    </h4>
    </main>
</template>

<script>
import login from '../../components/login/LoginBob'
import register from '../../components/login/Register'
export default {
  name: 'Login',
  components: {login, register},
  data () {
    return {
      status: 'login'
    }
  },
  methods: {
    changeRegister (option) {
      this.status = option
    }
  }
}
</script>

<style scoped>

</style>
